package com.bjpowernode.crm.service.impl;

import com.bjpowernode.crm.mapper.TypeMapper;
import com.bjpowernode.crm.pojo.Type;
import com.bjpowernode.crm.service.TypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Resource
    private TypeMapper typeMapper;
    @Override
    public void addDictionaryType(Type type) {
         typeMapper.addDictionaryType(type);
    }

    //编码是否重复验证：
    @Override
    public Type getCode(String code) {
        return typeMapper.getCode(code);
    }

    @Override
    public List<Type> getType() {
        return typeMapper.getType();
    }

    @Override
    public void editType(Type type) {
         typeMapper.editType(type);
    }

    @Override
    public void delType(String[] codes) {
        typeMapper.delType(codes);
    }

    @Override
    public String[] findToTypeCode(String[] codes) {
        return typeMapper.selectToTypeCode(codes);

    }


}
